-
Notifications
You must be signed in to change notification settings - Fork 894
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve handling of compilation flags with CMake #572
Commits on Dec 12, 2018
-
[C++] Use PROJECT_SOURCE_DIR for sourced exceptions.
While CMAKE_SOURCE_DIR can point to another project root if Aeron is included as a subdirectory, PROJECT_SOURCE_DIR always points to Aeron's project root which will result in the same paths being generated regardless of a standalone build or subproject build.
Configuration menu - View commit details
-
Copy full SHA for 538cf8d - Browse repository at this point
Copy the full SHA 538cf8dView commit details -
[C++] Increment minimum required version of CMake to 3.1.3.
This version is the minimum required for the variable CMAKE_CXX_STANDARD.
Configuration menu - View commit details
-
Copy full SHA for 3babd8d - Browse repository at this point
Copy the full SHA 3babd8dView commit details -
[C++] Set C standard with CMake.
This adds the flag -std=c11 to GCC and Clang. Visual Studio does not seem to have full conformance to C11 standard yet.
Configuration menu - View commit details
-
Copy full SHA for c124032 - Browse repository at this point
Copy the full SHA c124032View commit details -
[C++] Disable C and C++ extensions through CMake.
This is equal to setting -std=c11 and -std=c++11 as opposed to -std=gnu11 and -std=gnu++11.
Configuration menu - View commit details
-
Copy full SHA for 7c1fa95 - Browse repository at this point
Copy the full SHA 7c1fa95View commit details -
[C++] Remove explicit appending of version flags.
CMake automatically appends these when it detects CMAKE_C_STANDARD and CMAKE_CXX_STANDARD has been set.
Configuration menu - View commit details
-
Copy full SHA for 35a9c7a - Browse repository at this point
Copy the full SHA 35a9c7aView commit details -
[C++] Remove explicit appending of
-g
flag.This flag is automatically appended by CMake in debug builds which include RelWithDebInfo. Release mode should not have debug symbols.
Configuration menu - View commit details
-
Copy full SHA for 0b1daa9 - Browse repository at this point
Copy the full SHA 0b1daa9View commit details -
[C++] Remove explicit setting of O0 for debug mode.
This flag is added automatically by CMake in Debug mode.
Configuration menu - View commit details
-
Copy full SHA for 6f42d62 - Browse repository at this point
Copy the full SHA 6f42d62View commit details -
[C++] Use add_compile_options wherever possible.
add_compile_options works on both C and C++ sources and has a cleaner usage less prone to wiping off old flags.
Configuration menu - View commit details
-
Copy full SHA for 5b12bfe - Browse repository at this point
Copy the full SHA 5b12bfeView commit details -
[C++] Use add_compile_options for compiler flags.
add_definitions is semantically used to pass macro definitions to source files.
Configuration menu - View commit details
-
Copy full SHA for 105e1e4 - Browse repository at this point
Copy the full SHA 105e1e4View commit details -
[C++] Add option to enable Ofast in release builds.
CMake automatically adds -O3 for release builds. Ofast adds potentially breaking non-standard optimizations during compilation. This change keeps -Ofast enabled for stand alone builds but disables it when Aeron is added with add_subdirectory command.
Configuration menu - View commit details
-
Copy full SHA for 3a726fe - Browse repository at this point
Copy the full SHA 3a726feView commit details -
[C++] Pass C and C++ compilers to subprojects.
If a compiler set different from CC and CXX is used to build Aeron and tests and benchmarks are enabled by using CMAKE_C_COMPILER and CMAKE_CXX_COMPILER, Aeron source and the tests are built using different compilers.
Configuration menu - View commit details
-
Copy full SHA for 40eb7e4 - Browse repository at this point
Copy the full SHA 40eb7e4View commit details -
[C++] Remove conditional addition of -m64 flag
x86 or x86_64 compilation is already based on the architecture of the machine running the build. These flags are necessary if the target architecture is different from the one that compiles the code.
Configuration menu - View commit details
-
Copy full SHA for dd6b8b5 - Browse repository at this point
Copy the full SHA dd6b8b5View commit details -
[C++] Remove explicit addition of -fexceptions
fexceptions is enabled for C++ by default.
Configuration menu - View commit details
-
Copy full SHA for 61f60eb - Browse repository at this point
Copy the full SHA 61f60ebView commit details