View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0027355 | Open CASCADE | OCCT:Configuration | public | 2016-04-05 12:22 | 2016-04-20 15:51 |
Reporter | Assigned To | ||||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Platform | Windows | ||||
Product Version | 7.0.0 | ||||
Target Version | 7.0.0 | Fixed in Version | 7.0.0 | ||
Summary | 0027355: Configuration, CMake: install path on Windows is incorrectly processed | ||||
Description | With CMake, the standard way to specify installation directory is to use CMAKE_INSTALL_PREFIX variable: cmake -DCMAKE_INSTALL_PREFIX=/path/to/the/install/dir ... On Linux, this variable defaults to "/usr/local", while on Windows, it defaults to "C:/Program Files" (https://cmake.org/cmake/help/v2.8.11/cmake.html#variable:CMAKE_INSTALL_PREFIX). All dependent installation directories (for includes, libs, executables, resources, docs, adm files etc) are inherited from CMAKE_INSTALL_PREFIX. But 1: On Windows, OCCT hardcodes CMAKE_INSTALL_PREFIX to https://cmake.org/cmake/help/v2.8.11/cmake.html#variable:CMAKE_INSTALL_PREFIX: if (NOT DEFINED INSTALL_DIR) # set default install directory for Windows if (WIN32) set (CMAKE_INSTALL_PREFIX "C:/opencascade-${OCC_VERSION_STRING_EXT}") endif() set (INSTALL_DIR "${CMAKE_INSTALL_PREFIX}" CACHE PATH "${INSTALL_DIR_DESCR}") endif() This does not allow specifying CMAKE_INSTALL_PREFIX via the command line as its value is ignored. This is incorrect and should be changed. if (WIN32 and not CMAKE_INSTALL_PREFIX) set (CMAKE_INSTALL_PREFIX "C:/opencascade-${OCC_VERSION_STRING_EXT}") endif() Bug 2. On Windows, if INSTALL_DIR is specified in native Windows style - with back slashes, the configuration fails. This should be fixed - it seems that TO_CMAKE_PATH function should be used when processing this variable. Also, as soon as Bug 1 is fixed, it will be necessary to check if Bug 2 is not reproduced with CMAKE_INSTALL_PREFIX (note: with standard way, without any customization, CMAKE_INSTALL_PREFIX is correctly processed by CMake). | ||||
Steps To Reproduce | Run CMake with -DINSTALL_DIR:STRING=D:\occt and with -DCMAKE_INSTALL_PREFIX:STRING=D:\occt and check the INSTALL_DIR value in cache. It should be defined as specified but with straight slashes. | ||||
Tags | No tags attached. | ||||
Test case number | |||||
|
Branch CR27355 has been created by ibs. SHA-1: ffabaa661c3d1ac4d363905ecffad3e6d396f19c Detailed log of new commits: Author: ibs Date: Tue Apr 5 13:23:33 2016 +0300 0027355: Configuration, CMake: install path on Windows is incorrectly processed a default value of CMAKE_INSTALL_PREFIX is set only when this variable is not specified by an user |
|
Branch CR27355_1 has been created by abv. SHA-1: dc18602697c44112b6c05ab3585a744f708c1402 Detailed log of new commits: Author: abv Date: Tue Apr 5 13:34:28 2016 +0300 0027355: Configuration, CMake: install path on Windows is incorrectly processed Avoid resetting CMAKE_INSTALL_PREFIX if defined. Back slashes are converted to straight slashes in INSTALL_DIR and 3RDPARTY_DIR variables. |
|
The fix is pushed to CR27355_1, please review |
|
Branch CR27355_1 has been updated forcibly by abv. SHA-1: 74d7494cb66bfcbd3841ddbbc0119ca99f8275f2 |
|
Branch CR27355_1 has been updated forcibly by abv. SHA-1: 87d8ff3765a42ad2e0859f147c7df54298841bbb |
|
Branch CR27355_1 has been updated forcibly by abv. SHA-1: 84258256c036cc5510920ea6936540d124ec0448 |
|
Please test. |
|
Branch CR27355_1 has been deleted by kgv. SHA-1: 84258256c036cc5510920ea6936540d124ec0448 |
|
Branch CR27355 has been deleted by inv. SHA-1: ffabaa661c3d1ac4d363905ecffad3e6d396f19c |
occt: master 84258256 2016-04-05 10:34:28
Committer: abv Details Diff |
0027355: Configuration, CMake: install path on Windows is incorrectly processed Avoid resetting CMAKE_INSTALL_PREFIX if defined. Back slashes are converted to straight slashes in INSTALL_DIR and 3RDPARTY_DIR variables. |
Affected Issues 0027355 |
|
mod - CMakeLists.txt | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2016-04-05 12:22 |
|
New Issue | |
2016-04-05 12:22 |
|
Assigned To | => bugmaster |
2016-04-05 12:31 |
|
Assigned To | bugmaster => ibs |
2016-04-05 12:31 |
|
Status | new => assigned |
2016-04-05 12:58 |
|
Relationship added | related to 0027176 |
2016-04-05 13:23 | git | Note Added: 0052387 | |
2016-04-05 13:48 | git | Note Added: 0052390 | |
2016-04-05 13:52 |
|
Note Added: 0052392 | |
2016-04-05 13:52 |
|
Assigned To | ibs => vsr |
2016-04-05 13:52 |
|
Status | assigned => resolved |
2016-04-05 13:52 |
|
Steps to Reproduce Updated | |
2016-04-05 14:31 | git | Note Added: 0052397 | |
2016-04-05 15:55 | git | Note Added: 0052400 | |
2016-04-05 16:28 | git | Note Added: 0052402 | |
2016-04-06 10:22 |
|
Note Added: 0052418 | |
2016-04-06 10:22 |
|
Assigned To | vsr => bugmaster |
2016-04-06 10:22 |
|
Status | resolved => reviewed |
2016-04-06 10:33 |
|
Changeset attached | => occt master 84258256 |
2016-04-06 10:33 |
|
Assigned To | bugmaster => abv |
2016-04-06 10:33 |
|
Status | reviewed => verified |
2016-04-06 10:33 |
|
Resolution | open => fixed |
2016-04-08 06:32 |
|
Relationship added | parent of 0027365 |
2016-04-17 14:42 | git | Note Added: 0053225 | |
2016-04-20 11:33 | git | Note Added: 0053328 | |
2016-04-20 15:42 |
|
Fixed in Version | => 7.0.0 |
2016-04-20 15:51 |
|
Status | verified => closed |