Skip to content

Commit 47ecd5f

Browse files
ChristianTackeGSIdennisklein
authored andcommitted
Drop USE_PATH_INFO CMake option
Baking the PATH and LD_LIBRARY_PATH values at configure time into the install tree is no good idea, really.
1 parent bc77525 commit 47ecd5f

File tree

4 files changed

+1
-35
lines changed

4 files changed

+1
-35
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
4141
* If your code has specific C++ needs, consider CMake's `target_compile_features()`.
4242
* Dropped `CHECK_EXTERNAL_PACKAGE_INSTALL_DIR`
4343
* Just remove it from your `CMakeLists.txt`.
44+
* Dropped `USE_PATH_INFO` CMake option. It was an anti-pattern. Don't use it!
4445
4546
### Deprecated
4647
* Deprecating MbsAPI

CMakeLists.txt

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -93,17 +93,6 @@ SET(VMCWORKDIR ${CMAKE_SOURCE_DIR}/examples)
9393
include(CheckSymbolExists)
9494

9595

96-
Option(USE_PATH_INFO "Information from PATH and LD_LIBRARY_PATH are used." OFF)
97-
98-
If(USE_PATH_INFO)
99-
Set(PATH $ENV{PATH})
100-
If (APPLE)
101-
Set(LD_LIBRARY_PATH $ENV{DYLD_LIBRARY_PATH})
102-
Else (APPLE)
103-
Set(LD_LIBRARY_PATH $ENV{LD_LIBRARY_PATH})
104-
EndIf (APPLE)
105-
EndIf(USE_PATH_INFO)
106-
10796
if(DEFINED ENV{SIMPATH})
10897
set(SIMPATH $ENV{SIMPATH})
10998
list(PREPEND CMAKE_PREFIX_PATH ${SIMPATH})

templates/project_root_containers/CMakeLists.txt

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -61,18 +61,6 @@ set(LIBRARY_OUTPUT_PATH "${CMAKE_BINARY_DIR}/lib")
6161
set(EXECUTABLE_OUTPUT_PATH "${CMAKE_BINARY_DIR}/bin")
6262
set(INCLUDE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/include")
6363
Set(VMCWORKDIR ${CMAKE_SOURCE_DIR})
64-
Option(USE_PATH_INFO "Information from PATH and LD_LIBRARY_PATH are
65-
used." OFF)
66-
If(USE_PATH_INFO)
67-
Set(PATH "$PATH")
68-
If (APPLE)
69-
Set(LD_LIBRARY_PATH $ENV{DYLD_LIBRARY_PATH})
70-
Else (APPLE)
71-
Set(LD_LIBRARY_PATH $ENV{LD_LIBRARY_PATH})
72-
EndIf (APPLE)
73-
Else(USE_PATH_INFO)
74-
STRING(REGEX MATCHALL "[^:]+" PATH $ENV{PATH})
75-
EndIf(USE_PATH_INFO)
7664

7765

7866
# Check if the user wants to build the project in the source

templates/project_stl_containers/CMakeLists.txt

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -61,18 +61,6 @@ set(LIBRARY_OUTPUT_PATH "${CMAKE_BINARY_DIR}/lib")
6161
set(EXECUTABLE_OUTPUT_PATH "${CMAKE_BINARY_DIR}/bin")
6262
set(INCLUDE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/include")
6363
Set(VMCWORKDIR ${CMAKE_SOURCE_DIR})
64-
Option(USE_PATH_INFO "Information from PATH and LD_LIBRARY_PATH are
65-
used." OFF)
66-
If(USE_PATH_INFO)
67-
Set(PATH "$PATH")
68-
If (APPLE)
69-
Set(LD_LIBRARY_PATH $ENV{DYLD_LIBRARY_PATH})
70-
Else (APPLE)
71-
Set(LD_LIBRARY_PATH $ENV{LD_LIBRARY_PATH})
72-
EndIf (APPLE)
73-
Else(USE_PATH_INFO)
74-
STRING(REGEX MATCHALL "[^:]+" PATH $ENV{PATH})
75-
EndIf(USE_PATH_INFO)
7664

7765

7866
# Check if the user wants to build the project in the source

0 commit comments

Comments
 (0)