MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0027355Open CASCADE[OCCT] OCCT:Configurationpublic2016-04-05 12:222016-04-20 15:51
Reportervsr 
Assigned Toabv 
PrioritynormalSeverityminor 
StatusclosedResolutionfixed 
PlatformWindowsOSOS Version
Product Version[OCCT] 7.0.0 
Target Version[OCCT] 7.0.0Fixed in Version[OCCT] 7.0.0 
Summary0027355: Configuration, CMake: install path on Windows is incorrectly processed
DescriptionWith 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 ReproduceRun 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.
TagsNo tags attached.
Test case number
Attached Files

- Relationships
parent of 0027365closedabv Open CASCADE Configuration, CMake - file writing error appears if 3RDPARTY_DIR is empty 
related to 0027176closedabv Open CASCADE Configuration, CMake - INSTALL_DIR is a common prefix for all other install variables 

-  Notes
(0052387)
git (administrator)
2016-04-05 13:23

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
(0052390)
git (administrator)
2016-04-05 13:48

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.
(0052392)
abv (manager)
2016-04-05 13:52

The fix is pushed to CR27355_1, please review
(0052397)
git (administrator)
2016-04-05 14:31

Branch CR27355_1 has been updated forcibly by abv.

SHA-1: 74d7494cb66bfcbd3841ddbbc0119ca99f8275f2
(0052400)
git (administrator)
2016-04-05 15:55

Branch CR27355_1 has been updated forcibly by abv.

SHA-1: 87d8ff3765a42ad2e0859f147c7df54298841bbb
(0052402)
git (administrator)
2016-04-05 16:28

Branch CR27355_1 has been updated forcibly by abv.

SHA-1: 84258256c036cc5510920ea6936540d124ec0448
(0052418)
vsr (developer)
2016-04-06 10:22

Please test.
(0053225)
git (administrator)
2016-04-17 14:42

Branch CR27355_1 has been deleted by kgv.

SHA-1: 84258256c036cc5510920ea6936540d124ec0448
(0053328)
git (administrator)
2016-04-20 11:33

Branch CR27355 has been deleted by inv.

SHA-1: ffabaa661c3d1ac4d363905ecffad3e6d396f19c

- Related Changesets
occt: master 84258256
Timestamp: 2016-04-05 10:34:28
Author: abv
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.
mod - CMakeLists.txt Diff ] File ]

- Issue History
Date Modified Username Field Change
2016-04-05 12:22 vsr New Issue
2016-04-05 12:22 vsr Assigned To => bugmaster
2016-04-05 12:31 abv Assigned To bugmaster => ibs
2016-04-05 12:31 abv Status new => assigned
2016-04-05 12:58 ibs 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 abv Note Added: 0052392
2016-04-05 13:52 abv Assigned To ibs => vsr
2016-04-05 13:52 abv Status assigned => resolved
2016-04-05 13:52 abv Steps to Reproduce Updated View Revisions
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 vsr Note Added: 0052418
2016-04-06 10:22 vsr Assigned To vsr => bugmaster
2016-04-06 10:22 vsr Status resolved => reviewed
2016-04-06 10:33 abv Changeset attached => occt master 84258256
2016-04-06 10:33 abv Assigned To bugmaster => abv
2016-04-06 10:33 abv Status reviewed => verified
2016-04-06 10:33 abv Resolution open => fixed
2016-04-08 06:32 abv Relationship added parent of 0027365
2016-04-08 06:32 abv Relationship added parent of 0027363
2016-04-17 14:42 git Note Added: 0053225
2016-04-20 11:33 git Note Added: 0053328
2016-04-20 15:42 aiv Fixed in Version => 7.0.0
2016-04-20 15:51 aiv Status verified => closed


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker