You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CMake allows to specify a toolchain file to, among other things, specify options.
However, setting up options in the toolchain file does not have any effect.
To Reproduce
Create a conan_toolchain.cmake in the project root directory with the following content:
set(MATX_BUILD_EXAMPLES ON CACHE BOOL "")
Run the following commands:
mkdir build &&cd build
cmake --toolchain ../conan_toolchain.cmake ..
make -j
Expected Behavior
The project should build the examples but looking at CMakeCache.txt, MATX_BUILD_EXAMPLES is still set to OFF.
System Details
OS: AlmaLinux release 8.4
CUDA version: 12.2
g++ version: 11.2
Additional Context
CMake being CMake, this issue seems to depends on the relative position of the options and project in the CMakeLists.txt. When project comes first, using a toolchain file will modify the cache as expected.
AFAIK, this is undocumented.
The text was updated successfully, but these errors were encountered:
raplonu
added a commit
to raplonu/MatX
that referenced
this issue
Jun 7, 2024
Describe the Bug
CMake allows to specify a toolchain file to, among other things, specify options.
However, setting up options in the toolchain file does not have any effect.
To Reproduce
conan_toolchain.cmake
in the project root directory with the following content:Expected Behavior
The project should build the examples but looking at
CMakeCache.txt
,MATX_BUILD_EXAMPLES
is still set toOFF
.System Details
Additional Context
CMake being CMake, this issue seems to depends on the relative position of the
option
s andproject
in theCMakeLists.txt
. Whenproject
comes first, using a toolchain file will modify the cache as expected.AFAIK, this is undocumented.
The text was updated successfully, but these errors were encountered: