I would like to change CMAKE_C_COMPILER and CMAKE_CXX_COMPILER in an inner sub_directory being compiled as part of a bigger project.
changing from GNU to intel compiler. however, outside of this directory nothing has to chagne.
is that possible?
Thanks
Add a subdirectory to the build. Adds a subdirectory to the build. The source_dir specifies the directory in which the source CMakeLists.
Instead of using add_subdirectory
consider making the subdirectory a self-contained CMake project, which can be configured and built independently of the bigger project. You can then add the subdirectory to your bigger project as an external project by using the ExternalProject_Add command.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With