Skip to content
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

cpp_feature_detection(THREADS) lack of pthread lib #131

Open
KAlO2 opened this issue Jul 3, 2016 · 2 comments
Open

cpp_feature_detection(THREADS) lack of pthread lib #131

KAlO2 opened this issue Jul 3, 2016 · 2 comments
Assignees

Comments

@KAlO2
Copy link

KAlO2 commented Jul 3, 2016

Now GCC supports all the c++11 features, but when I use cmake on Ubuntu, I always get this message "Detecting support for c++ feature 'THREADS': false", and I see it try_compile the file oglplus/config/cpp/has_THREADS.cpp

when I use command gcc has_THREADS.cpp -Wall -lstdc++ -std=c++11 -pthread, it's OK.
So I guess try_compile command is missing pthread lib, and finally it works. (What about Windows platform?)

try_compile(
OGLPLUS_HAS_${FEATURE_NAME}
${PROJECT_BINARY_DIR}/cpp
${PROJECT_BINARY_DIR}/cpp/has_${FEATURE_NAME}.cpp
COMPILE_DEFINITIONS ${OGLPLUS_CPP_STD_COMPILER_SWITCH}
LINK_LIBRARIES pthread
)

@matus-chochlik matus-chochlik self-assigned this Jul 3, 2016
@matus-chochlik
Copy link
Owner

matus-chochlik commented Jul 3, 2016

I pushed some changes on develop. Could You test if that fixes the problem for you?

@KAlO2 KAlO2 closed this as completed Jul 19, 2016
@KAlO2
Copy link
Author

KAlO2 commented Jul 19, 2016

NO, it fails again.

-- Detecting support for c++ feature 'SCOPED_ENUMS': TRUE
-- Detecting support for c++ feature 'SCOPED_ENUM_TEMPLATE_PARAMS': TRUE
-- Detecting support for c++ feature 'VARIADIC_MACROS': TRUE
-- Detecting support for c++ feature 'VARIADIC_TEMPLATES': TRUE
-- Detecting support for c++ feature 'UNIFIED_INITIALIZATION_SYNTAX': TRUE
-- Detecting support for c++ feature 'INITIALIZER_LISTS': TRUE
-- Detecting support for c++ feature 'DEFAULTED_FUNCTIONS': TRUE
-- Detecting support for c++ feature 'DELETED_FUNCTIONS': TRUE
-- Detecting support for c++ feature 'EXPLICIT_CONVERSION_OPERATORS': TRUE
-- Detecting support for c++ feature 'FUNCTION_TEMPLATE_DEFAULT_ARGS': TRUE
-- Detecting support for c++ feature 'UNICODE_LITERALS': TRUE
-- Detecting support for c++ feature 'USER_DEFINED_LITERALS': TRUE
-- Detecting support for c++ feature 'INHERITED_CONSTRUCTORS': TRUE
-- Detecting support for c++ feature 'GENERALIZED_ATTRIBUTES': TRUE
-- Detecting support for c++ feature 'TEMPLATE_ALIASES': TRUE
-- Detecting support for c++ feature 'CONSTEXPR': TRUE
-- Detecting support for c++ feature 'NOEXCEPT': TRUE
-- Detecting support for c++ feature 'OVERRIDE': TRUE
-- Detecting support for c++ feature 'LAMBDAS': TRUE
-- Detecting support for c++ feature 'CHRONO': TRUE
-- Detecting support for c++ feature 'THREADS': FALSE
-- Could NOT find Boost
-- Skipping 'glx_main' because 'THREADS' not implemented properly.

@KAlO2 KAlO2 reopened this Jul 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants