-
Notifications
You must be signed in to change notification settings - Fork 951
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
Add more C++-standard-related CMake options to the build system #76
Labels
Comments
s3rvac
added a commit
to avast/pelib
that referenced
this issue
Feb 4, 2018
set(CMAKE_CXX_STANDARD_REQUIRED ON) This makes C++14 a requirement and prevents a "decay" to C++98 when the compiler does not support C++14. RetDec and related tools require C++14 to build, so the sooner the build fails the better. set(CMAKE_CXX_EXTENSIONS OFF) This disables the use of compiler-specific extensions. For example, by default, CMake passes -std=gnu++14 to GCC on Linux. We want to build with -std=c++14 to prevent use of non-portable compiler extensions, which is what the disabling of this option does. For more details, see avast/retdec#76
s3rvac
added a commit
to avast/capstone-dumper
that referenced
this issue
Feb 4, 2018
set(CMAKE_CXX_STANDARD_REQUIRED ON) This makes C++14 a requirement and prevents a "decay" to C++98 when the compiler does not support C++14. RetDec and related tools require C++14 to build, so the sooner the build fails the better. set(CMAKE_CXX_EXTENSIONS OFF) This disables the use of compiler-specific extensions. For example, by default, CMake passes -std=gnu++14 to GCC on Linux. We want to build with -std=c++14 to prevent use of non-portable compiler extensions, which is what the disabling of this option does. For more details, see avast/retdec#76
s3rvac
added a commit
to avast/retdec-idaplugin
that referenced
this issue
Feb 4, 2018
set(CMAKE_CXX_STANDARD_REQUIRED ON) This makes C++14 a requirement and prevents a "decay" to C++98 when the compiler does not support C++14. RetDec and related tools require C++14 to build, so the sooner the build fails the better. set(CMAKE_CXX_EXTENSIONS OFF) This disables the use of compiler-specific extensions. For example, by default, CMake passes -std=gnu++14 to GCC on Linux. We want to build with -std=c++14 to prevent use of non-portable compiler extensions, which is what the disabling of this option does. For more details, see avast/retdec#76
s3rvac
added a commit
that referenced
this issue
Feb 4, 2018
set(CMAKE_CXX_STANDARD_REQUIRED ON) This makes C++14 a requirement and prevents a "decay" to C++98 when the compiler does not support C++14. RetDec and related tools require C++14 to build, so the sooner the build fails the better. set(CMAKE_CXX_EXTENSIONS OFF) This disables the use of compiler-specific extensions. For example, by default, CMake passes -std=gnu++14 to GCC on Linux. We want to build with -std=c++14 to prevent use of non-portable compiler extensions, which is what the disabling of this option does.
s3rvac
added a commit
that referenced
this issue
Feb 4, 2018
I have added the build settings to all our repositories that did not have them:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In addition to
set(CMAKE_CXX_STANDARD 14)
, we should add the following two options intoCMakeLists.txt
:set(CMAKE_CXX_STANDARD_REQUIRED ON)
This makes C++14 a requirement and prevents a "decay" to C++98 when the compiler does not support C++14. RetDec and related tools require C++14 to build, so the sooner the build fails the better.set(CMAKE_CXX_EXTENSIONS OFF)
This disables the use of compiler-specific extensions. For example, by default, CMake passes-std=gnu++14
to GCC on Linux. We want to build with-std=c++14
to prevent use of non-portable compiler extensions, which is what the disabling of this option does.Note: These changes should be added to all our repositories.
The text was updated successfully, but these errors were encountered: