-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmake: Clean up build type and install options.
THIS INCLUDES BREAKING CHANGES. 1. Remove the DEBUG build option (forgot CMake already has such an option through CMAKE_BUILD_TYPE). 2. If no build type is specified, we build for release. Importantly, this means building with -O3. 3. Install directory is ${LLVM_HOME}, not ${LLVM_HOME}/install. 4. Remove BUILD_ON_SOURCE option - this is silly. If the user is going to build with CMake, he/she should it properly (i.e. build out of source and install with `make install`). This is the breaking change - users of CMake will need to run `make install` and update their Makefiles to reflect the new installation directory structure (bin/ and lib/ instead of full-trace/ and profile-func/). Change-Id: Icbf32468b89716aa3f8baf504bfe2e9d66f38ceb
- Loading branch information
Showing
6 changed files
with
11 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,8 @@ | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti") | ||
if (DEBUG) | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O0 -g") | ||
else (DEBUG) | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3") | ||
endif (DEBUG) | ||
|
||
file(GLOB SRC "*.cpp") | ||
add_library(full_trace SHARED ${SRC}) | ||
install(TARGETS full_trace LIBRARY DESTINATION lib) | ||
|
||
# remove name prefix in order not to generate libxxxxxx name | ||
set_target_properties(full_trace PROPERTIES PREFIX "") | ||
|
||
if(${BUILD_ON_SOURCE}) | ||
set_target_properties(full_trace PROPERTIES LIBRARY_OUTPUT_DIRECTORY | ||
"${CMAKE_CURRENT_SOURCE_DIR}") | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters