cmake-scopes Questions

3

Solved

Is there any way to detect if the current scope has a parent? I have a project that can either be a standalone project or a sub-project of another. To allow the sub project case, I use the PARENT_...
Jenniejennifer asked 8/8, 2014 at 9:2

5

Solved

Consider the following minimal example: . ├── bar │   └── CMakeLists.txt └── CMakeLists.txt where ./CMakeLists.txt is project( foo ) cmake_minimum_required( VERSION 2.8 ) set( FOO "Exists in b...
Profusive asked 27/4, 2015 at 10:15

6

How can I prepend all filenames on the list with a common path prefix automatically? For instance having a list of files in CMakeLists.txt: SET(SRC_FILES foo1.cpp foo2.cpp) I'd like to get a lis...
Flown asked 3/12, 2010 at 14:20

2

If I do: set(SourceDir ${CMAKE_CURRENT_SOURCE_DIR} PARENT_SCOPE) message("SourceDir: " ${SourceDir}) The message says that SourceDir is empty. Presumably it is being set in the parent scope only...
Breccia asked 1/12, 2015 at 19:16

2

Solved

I have a cmake project in which I have some modules and I'm using Find-*.cmake for including the shared modules in the application. For not taking in account every module that I add, I have defined...
Ophthalmitis asked 13/10, 2013 at 13:46
1

© 2022 - 2024 — McMap. All rights reserved.