On 18.06.2016 11:38, Alexander Shukaev wrote:
I did try both variants, after and before
cmake_minimum_required(VERSION)
but the result is the same. The scope is for sure parent to targets.
I don't know what else it could be but this works fine for me:
cmake_minimum_required(VERSION 2.8.12)
if(POLICY CMP0063)
cmake_policy(SET CMP0063 NEW)
endif()
file(WRITE foo.cpp "int main() {}")
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
add_executable(foo foo.cpp)
Is it possible that the scope where the policy warning comes from has
its own cmake_minimum_required(VERSION) call? (e.g. is there more than one?)
Nils
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more
information on each offering, please visit:
CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake