-
Notifications
You must be signed in to change notification settings - Fork 179
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
Gcc 4.9 #4
Open
yoyonel
wants to merge
13
commits into
BartVandewoestyne:master
Choose a base branch
from
yoyonel:gcc-4.9
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Gcc 4.9 #4
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
d393348
Suppress .user config from QtCreator IDE
ATTYLionelIGN abe2cdd
Problème de compilation avec certains Items sous GCC-4.9. Desactivati…
ATTYLionelIGN 8a7935c
Modification de l'Item13 pour faire tourner les samples C++11 et 14
ATTYLionelIGN e559023
Fix pour faire tourner l'Item16 (pthread). TODO: à revoir, ce n'est p…
ATTYLionelIGN d501bb0
Items: 23 27 31
ATTYLionelIGN e64fd80
Items: 32 33 36
ATTYLionelIGN 710f496
Item34: Semble manquer du code pour cet item. Par exemple la fonction…
ATTYLionelIGN af8864f
Items: 8 16 21 22 23 27 31 35
ATTYLionelIGN c6a9032
Fix pour ajouter 'proprement' une gestion de la lib pthread
ATTYLionelIGN 75b78b8
Big refactoring ! (-> not very agile spirit :p)
ATTYLionelIGN c5d7ca1
Fix and clean some scripts in CMakeLists.txt
ATTYLionelIGN d946af1
remove some 'set_source_files_properties'
ATTYLionelIGN d81a517
Add scripts to configure and build with cmake and gcc-4.9.
ATTYLionelIGN File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ CMakeFiles | |
cmake_install.cmake | ||
CMakeCache.txt | ||
*.so | ||
CMakeLists.txt.user |
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,13 +1,20 @@ | ||
add_executable(pinch_of_pseudocode pinch_of_pseudocode.cpp) | ||
add_executable(case1_const case1_const.cpp) | ||
add_executable(case1_non_const case1_non_const.cpp) | ||
add_executable(case1_pointer case1_pointer.cpp) | ||
add_executable(case2_uref case2_uref.cpp) | ||
add_executable(case3_pass_by_value case3_pass_by_value.cpp) | ||
add_executable(array-to-pointer_decay_rule array-to-pointer_decay_rule.cpp) | ||
add_executable(arrays_by_value arrays_by_value.cpp) | ||
add_executable(arrays_by_reference arrays_by_reference.cpp) | ||
add_executable(function-to-pointer_decay_rule function-to-pointer_decay_rule.cpp) | ||
SET(NAMES_SAMPLES | ||
pinch_of_pseudocode | ||
case1_const | ||
case1_non_const | ||
case1_pointer | ||
case3_pass_by_value | ||
array-to-pointer_decay_rule | ||
arrays_by_value | ||
arrays_by_reference | ||
function-to-pointer_decay_rule | ||
) | ||
subitems_add_executables("${NAMES_SAMPLES}" "") | ||
|
||
add_library(item01 deduce_nb_array_elements.cpp | ||
array_and_pointer_parameter_equivalence.cpp) | ||
subitem_add_executable(NAME case2_uref SRC case2_uref.cpp ADD_FLAG_FOR_CXX_11) | ||
|
||
subitem_add_library( | ||
NAME item01 | ||
SRC deduce_nb_array_elements.cpp array_and_pointer_parameter_equivalence.cpp | ||
ADD_FLAG_FOR_CXX_11 | ||
) |
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,5 +1,7 @@ | ||
set_source_files_properties(function_return_type_deduction.cpp PROPERTIES COMPILE_FLAGS -std=c++14) | ||
SET(SAMPLES_NAMES | ||
auto_type_deduction | ||
auto_deduction_vs_template_deduction | ||
) | ||
subitems_add_executables("${SAMPLES_NAMES}" "ADD_FLAG_FOR_CXX_11") | ||
|
||
add_executable(auto_type_deduction auto_type_deduction.cpp) | ||
add_executable(auto_deduction_vs_template_deduction auto_deduction_vs_template_deduction.cpp) | ||
add_executable(function_return_type_deduction function_return_type_deduction.cpp) | ||
subitems_add_executables("function_return_type_deduction" "ADD_FLAG_FOR_CXX_14") |
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,11 +1,13 @@ | ||
# TODO: check C++14 code! | ||
## TODO: check C++14 code! | ||
subitem_add_executable( | ||
NAME decltype_for_complicated_lvalues | ||
SRC decltype_for_complicated_lvalues.cpp | ||
) | ||
|
||
add_executable(decltype_for_complicated_lvalues decltype_for_complicated_lvalues.cpp) | ||
|
||
add_library(item02 problem.cpp | ||
# decltype_auto_for_function_return_types_cpp14.cpp | ||
# decltype_auto_for_normal_auto_variables_cpp14.cpp | ||
typical_cases.cpp | ||
string_deque.cpp | ||
# return_statements_cpp14.cpp | ||
) | ||
subitem_add_library( | ||
NAME item02 | ||
SRC problem.cpp typical_cases.cpp string_deque.cpp | ||
# decltype_auto_for_function_return_types_cpp14.cpp | ||
# return_statements_cpp14.cpp | ||
ADD_FLAG_FOR_CXX_11 | ||
) |
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,9 +1,9 @@ | ||
add_executable(runtime_output01 runtime_output01.cpp) | ||
add_executable(runtime_output02 runtime_output02.cpp) | ||
add_executable(boost_type_index boost_type_index.cpp) | ||
SET(NAMES_SAMPLES | ||
runtime_output01 | ||
runtime_output02 | ||
) | ||
subitems_add_executables("${NAMES_SAMPLES}" "ADD_FLAG_FOR_CXX_11") | ||
|
||
add_library(ide_editors.cpp | ||
compiler_diagnostics.cpp) | ||
subitems_add_executables("boost_type_index" "ADD_FLAG_FOR_CXX_11;USE_BOOST") | ||
|
||
find_package(Boost 1.56 REQUIRED) | ||
target_link_libraries(boost_type_index ${Boost_LIBRARIES}) | ||
subitem_add_library(NAME ide_editors SRC compiler_diagnostics.cpp ADD_FLAG_FOR_CXX_11) |
4 changes: 1 addition & 3 deletions
4
Item05_Prefer_auto_to_explicit_type_declarations/CMakeLists.txt
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,5 +1,3 @@ | ||
set_source_files_properties(auto.cpp PROPERTIES COMPILE_FLAGS -std=c++14) | ||
|
||
#TODO: wait until clang bug fixed!!! add_executable(auto auto.cpp) | ||
|
||
add_library(simple_joys simple_joys.cpp) | ||
subitems_add_libraries("simple_joys" "ADD_FLAG_FOR_CXX_11") |
16 changes: 13 additions & 3 deletions
16
...e_the_explicitly_typed_initializer_idiom_when_auto_deduces_undesired_types/CMakeLists.txt
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,3 +1,13 @@ | ||
add_executable(invisible_proxy_types invisible_proxy_types.cpp) | ||
#add_executable(matrix_example matrix_example.cpp) | ||
add_executable(typed_initializer_idiom typed_initializer_idiom.cpp) | ||
# ps: exception in execution ! | ||
# TODO: debug this sample ! | ||
SET(NAME_SAMPLES | ||
invisible_proxy_types | ||
typed_initializer_idiom | ||
) | ||
subitems_add_executables("${NAMES_SAMPLES}" "ADD_FLAG_FOR_CXX_11") | ||
|
||
#subitem_add_executable( | ||
# NAME matrix_example | ||
# SRC matrix_example.cpp | ||
# ADD_FLAG_FOR_CXX_11 | ||
#) |
17 changes: 10 additions & 7 deletions
17
Item07_Distinguish_between()_and_{}_when_creating_objects/CMakeLists.txt
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,7 +1,10 @@ | ||
add_executable(constructor_overload_resolution constructor_overload_resolution.cpp) | ||
add_executable(initialization_values initialization_values.cpp) | ||
add_executable(initializer_lists1 initializer_lists1.cpp) | ||
add_executable(initializer_lists2 initializer_lists2.cpp) | ||
add_executable(initializer_lists3 initializer_lists3.cpp) | ||
add_executable(initializer_lists4 initializer_lists4.cpp) | ||
add_executable(parenthesis_braces_in_templates parenthesis_braces_in_templates.cpp) | ||
SET(NAMES_SAMPLES | ||
constructor_overload_resolution | ||
initialization_values | ||
initializer_lists1 | ||
initializer_lists2 | ||
initializer_lists3 | ||
initializer_lists4 | ||
parenthesis_braces_in_templates | ||
) | ||
subitems_add_executables("${NAMES_SAMPLES}" "ADD_FLAG_FOR_CXX_11") |
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,9 +1,9 @@ | ||
add_executable(pointer_overload pointer_overload.cpp) | ||
add_executable(code_clarity code_clarity.cpp) | ||
add_executable(template_example_flat template_example_flat.cpp) | ||
SET(NAMES_SAMPLES | ||
pointer_overload | ||
code_clarity | ||
template_example_flat | ||
template_example_templatized | ||
) | ||
subitems_add_executables("${NAMES_SAMPLES}" "ADD_FLAG_FOR_CXX_11") | ||
|
||
# TODO: compile this as C++11 | ||
# add_executable(template_example_templatized template_example_templatized.cpp) | ||
|
||
# TODO: compile this as C++14 | ||
#add_executable(template_example_templatized_cpp14 template_example_templatized_cpp14.cpp) | ||
subitems_add_executables("template_example_templatized_cpp14" "ADD_FLAG_FOR_CXX_14") |
16 changes: 9 additions & 7 deletions
16
Item09_Prefer_alias_declarations_to_typedefs/CMakeLists.txt
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,7 +1,9 @@ | ||
add_library(item09 function_pointers.cpp | ||
linked_list_synonym_with_alias_template01.cpp | ||
linked_list_synonym_with_alias_template02.cpp | ||
linked_list_synonym_with_typedef01.cpp | ||
linked_list_synonym_with_typedef02.cpp | ||
# TODO wine.cpp | ||
) | ||
SET(SRC_FILES | ||
function_pointers.cpp | ||
linked_list_synonym_with_alias_template01.cpp | ||
linked_list_synonym_with_alias_template02.cpp | ||
linked_list_synonym_with_typedef01.cpp | ||
linked_list_synonym_with_typedef02.cpp | ||
# TODO wine.cpp | ||
) | ||
subitem_add_library(NAME item09 SRC ${SRC_FILES} ADD_FLAG_FOR_CXX_11) |
28 changes: 15 additions & 13 deletions
28
Item10_Prefer_scoped_enums_to_unscoped_enums/CMakeLists.txt
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,14 +1,16 @@ | ||
add_library(item10 unscoped_enums.cpp | ||
scoped_enums.cpp | ||
semantic_travesties01.cpp | ||
semantic_travesties02.cpp | ||
semantic_travesties03.cpp | ||
forward_declaring.cpp | ||
forward_declared_enums.cpp | ||
underlying_type01.cpp | ||
underlying_type02.cpp | ||
unscoped_enums_useful01.cpp | ||
unscoped_enums_useful02.cpp | ||
unscoped_enums_useful03.cpp | ||
unscoped_enums_useful04.cpp) | ||
SET(SRC_FILES | ||
scoped_enums.cpp | ||
semantic_travesties01.cpp | ||
semantic_travesties02.cpp | ||
semantic_travesties03.cpp | ||
forward_declaring.cpp | ||
forward_declared_enums.cpp | ||
underlying_type02.cpp | ||
unscoped_enums_useful01.cpp | ||
unscoped_enums_useful02.cpp | ||
unscoped_enums_useful03.cpp | ||
unscoped_enums_useful04.cpp | ||
) | ||
subitem_add_library(NAME item10 SRC ${SRC_FILES} ADD_FLAG_FOR_CXX_11) | ||
|
||
# TODO: compile C++14 code unscoped_enums_useful04_cpp14.cpp) |
10 changes: 7 additions & 3 deletions
10
Item11_Prefer_deleted_functions_to_private_undefined_ones/CMakeLists.txt
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,3 +1,7 @@ | ||
add_executable(Item12 Item12.cpp) | ||
add_library(pointer_example pointer_example.cpp) | ||
add_library(Widget Widget.cpp) | ||
subitems_add_executables("Item12" "ADD_FLAG_FOR_CXX_11") | ||
|
||
SET(NAMES_SAMPLES | ||
pointer_example | ||
Widget | ||
) | ||
subitems_add_libraries("${NAMES_SAMPLES}" "ADD_FLAG_FOR_CXX_11") |
23 changes: 16 additions & 7 deletions
23
Item12_Declare_overriding_functions_override/CMakeLists.txt
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,9 +1,18 @@ | ||
add_executable(overriding_explained overriding_explained.cpp) | ||
add_executable(reference_qualifiers_example reference_qualifiers_example.cpp) | ||
add_library(typical_errors typical_errors.cpp) | ||
add_library(typical_errors_with_override_added typical_errors_with_override_added.cpp) | ||
add_library(typical_errors_corrected typical_errors_corrected.cpp) | ||
|
||
SET(NAMES_SAMPLES | ||
reference-qualified_member_functions_use_case_problem_demonstration | ||
reference-qualified_member_functions_use_case_problem_solution | ||
reference_qualifiers_example | ||
) | ||
subitems_add_executables("${NAMES_SAMPLES}" "ADD_FLAG_FOR_CXX_11") | ||
|
||
SET(NAMES_SAMPLES | ||
typical_errors | ||
typical_errors_with_override_added | ||
typical_errors_corrected | ||
override_games | ||
) | ||
subitems_add_libraries("${NAMES_SAMPLES}" "ADD_FLAG_FOR_CXX_11") | ||
|
||
add_library(override_legacy_code override_legacy_code.cpp) | ||
add_library(override_games override_games.cpp) | ||
add_executable(reference-qualified_member_functions_use_case_problem_demonstration reference-qualified_member_functions_use_case_problem_demonstration.cpp) | ||
add_executable(reference-qualified_member_functions_use_case_problem_solution reference-qualified_member_functions_use_case_problem_solution.cpp) |
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,3 +1,5 @@ | ||
add_executable(insertion_cpp98 insertion_cpp98.cpp) | ||
# TODO: find out why this doesn't compile!!! add_executable(insertion_cpp11 insertion_cpp11.cpp) | ||
# TODO add_executable(insertion_cpp11 insertion_cpp14.cpp) | ||
|
||
subitems_add_executables("insertion_cpp11" "ADD_FLAG_FOR_CXX_11") | ||
|
||
subitems_add_executables("insertion_cpp14" "ADD_FLAG_FOR_CXX_14") |
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
13 changes: 11 additions & 2 deletions
13
Item14_Declare_functions_noexcept_if_they_wont_emit_exceptions/CMakeLists.txt
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,4 +1,13 @@ | ||
add_library(never_throw_exception never_throw_exception.cpp) | ||
subitem_add_library( | ||
NAME never_throw_exception | ||
SRC never_throw_exception.cpp | ||
ADD_FLAG_FOR_CXX_11 | ||
) | ||
|
||
add_library(example_with_move example_with_move.cpp) | ||
|
||
add_executable(inconsistencies inconsistencies.cpp) | ||
subitem_add_executable( | ||
NAME inconsistencies | ||
SRC inconsistencies.cpp | ||
ADD_FLAG_FOR_CXX_11 | ||
) |
16 changes: 13 additions & 3 deletions
16
Item16_Make_const_member_functions_thread-safe/CMakeLists.txt
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,4 +1,14 @@ | ||
# TODO: complete this CMakeLists.txt | ||
#add_executable(insertion_cpp98 insertion_cpp98.cpp) | ||
add_executable(undefined_behavior undefined_behavior.cpp) | ||
subitem_add_executable( | ||
NAME expensive_int | ||
SRC expensive_int.cpp | ||
ADD_FLAG_FOR_CXX_11 | ||
) | ||
|
||
subitem_add_executable( | ||
NAME undefined_behavior | ||
SRC undefined_behavior.cpp | ||
ADD_FLAG_FOR_CXX_11 | ||
USE_PTHREAD | ||
) | ||
|
||
#add_library(roots Polynomial.cpp) |
6 changes: 6 additions & 0 deletions
6
Item17_Understand_special_member_function_generation/CMakeLists.txt
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
6 changes: 5 additions & 1 deletion
6
Item18_Use_std_unique_ptr_for_exclusive-ownership_resource_management/CMakeLists.txt
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,2 +1,6 @@ | ||
#add_library(investments_cpp11 investments_cpp11.cpp) | ||
#subitem_add_library( | ||
# NAME investments_cpp11 | ||
# SRC investments_cpp11.cpp | ||
# ADD_FLAG_FOR_CXX_11 | ||
#) | ||
#add_library(investments_cpp14 investments_cpp14.cpp) |
9 changes: 6 additions & 3 deletions
9
Item19_Use_std_shared_ptr_for_shared-ownership_resource_management/CMakeLists.txt
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,3 +1,6 @@ | ||
add_library(custom_deleters custom_deleters.cpp) | ||
add_library(multiple_control_blocks1 multiple_control_blocks1.cpp) | ||
add_library(multiple_control_blocks2 multiple_control_blocks2.cpp) | ||
SET(SAMPLES_NAMES | ||
custom_deleters | ||
multiple_control_blocks1 | ||
multiple_control_blocks2 | ||
) | ||
subitems_add_libraries("${SAMPLES_NAMES}" "ADD_FLAG_FOR_CXX_11") |
6 changes: 5 additions & 1 deletion
6
Item20_Use_std_weak_ptr_for_std_shared_ptr-like_pointers_that_can_dangle/CMakeLists.txt
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 +1,5 @@ | ||
add_executable(creation creation.cpp) | ||
subitem_add_executable( | ||
NAME creation | ||
SRC creation | ||
ADD_FLAG_FOR_CXX_11 | ||
) |
10 changes: 5 additions & 5 deletions
10
Item21_Prefer_std_make_unique_and_std_make_shared_to_direct_use_of_new/CMakeLists.txt
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,5 +1,5 @@ | ||
set_source_files_properties(reasons_for_preferring_make_functions.cpp PROPERTIES COMPILE_FLAGS -std=c++14) | ||
set_source_files_properties(limitations_of_make_functions.cpp PROPERTIES COMPILE_FLAGS -std=c++14) | ||
|
||
#add_executable(reasons_for_preferring_make_functions reasons_for_preferring_make_functions.cpp) | ||
#add_executable(limitations_of_make_functions limitations_of_make_functions.cpp) | ||
SET(SAMPLES_NAMES | ||
reasons_for_preferring_make_functions | ||
limitations_of_make_functions | ||
) | ||
subitems_add_executables("${SAMPLES_NAMES}" "ADD_FLAG_FOR_CXX_14") |
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why exactly must C be added here? Shouldn't the project be completely CXX?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's for (cmake) pthread compatibility.
Adding pthread like i do include some tests files (intern codes) to check if pthread is accessible for the current system.
It's a CMake mechanism (througth 'FindThreads.cmake').
MMmMMMM after reading the file 'FindThreads.cmake' (https://github.com/Kitware/CMake/blob/master/Modules/FindThreads.cmake) i'm not sure it's necessary after all ... i will check tomorrow to remove this line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oki ... seems strange ... maybe a bug (fix) from CMake.
In my system (from official package 'cmake') in FindThreads.cmake i don't have in the script a test for switching between C and CXX project (like in: https://github.com/Kitware/CMake/blob/master/Modules/FindThreads.cmake around line 94-99).
Maybe the depot (for Ubuntu14.04/Mint) isn't synchronized with the depot of the last release of CMake.
Whatever, with my version (CMake 3.2.2) i need to to add C flag to permit the build of the test file 'CheckForPthreads.c' needed by CMake & 'FindThreads.cmake' to check if a PThread lib is available (with a default/system path).
With the last release of CMake (from github depot), it will not be necessary anymore.