[vtkusers] Regression in old build system using CMake 3.12?

BBerco bebe0705 at colorado.edu
Tue Jan 22 18:31:38 EST 2019


I'm sorry for the confusion. Actually, the problem appears to arise when vtk
and the armadillo library are loaded together. I haven't tried more
combinations of library to see if the problem only arises in this specific
case.

Anyways, here's an even more minimal example demonstrating the problem. The
CMakeLists.txt shows two different ways to find VTK. The call that's relying
on COMPONENTS works fine, but the non-specific one leads to the error trace
pasted below.

*CMakeLists.txt*
cmake_minimum_required(VERSION 3.12)
project(main CXX)
# Find VTK Package. The non-specific call leads to +20 errors to be
generated at compile time
# find_package(VTK REQUIRED COMPONENTS vtkCommonCore)
find_package(VTK REQUIRED)
find_package(armadillo)
include(${VTK_USE_FILE})
add_executable(main main.cpp)
set(library_dependencies ${ARMADILLO_LIBRARIES} ${VTK_LIBRARIES})
target_link_libraries(main PUBLIC ${library_dependencies})

*
main.cpp*
#include <armadillo>
int main(){
	return 1;
}

*log.txt
*
In file included from /Users/bbercovici/Desktop/testOmp/main.cpp:3:
In file included from /usr/local/include/armadillo:26:
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:313:9: error:
no member named 'signbit' in the global namespace
using ::signbit;
      ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:314:9: error:
no member named 'fpclassify' in the global namespace
using ::fpclassify;
      ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:315:9: error:
no member named 'isfinite' in the global namespace; did you mean 'finite'?
using ::isfinite;
      ~~^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/math.h:749:12:
note: 'finite' declared here
extern int finite(double)
           ^
In file included from /Users/bbercovici/Desktop/testOmp/main.cpp:3:
In file included from /usr/local/include/armadillo:26:
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:316:9: error:
no member named 'isinf' in the global namespace
using ::isinf;
      ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:317:9: error:
no member named 'isnan' in the global namespace
using ::isnan;
      ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:318:9: error:
no member named 'isnormal' in the global namespace
using ::isnormal;
      ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:319:9: error:
no member named 'isgreater' in the global namespace
using ::isgreater;
      ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:320:9: error:
no member named 'isgreaterequal' in the global namespace
using ::isgreaterequal;
      ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:321:9: error:
no member named 'isless' in the global namespace
using ::isless;
      ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:322:9: error:
no member named 'islessequal' in the global namespace
using ::islessequal;
      ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:323:9: error:
no member named 'islessgreater' in the global namespace
using ::islessgreater;
      ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:324:9: error:
no member named 'isunordered' in the global namespace
using ::isunordered;
      ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:325:9: error:
no member named 'isunordered' in the global namespace
using ::isunordered;
      ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:551:28: error:
expected a qualified name after 'typename'
_LIBCPP_CONSTEXPR typename enable_if<is_floating_point<_A1>::value,
bool>::type
                           ^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:551:37: error:
expected ';' at end of declaration
_LIBCPP_CONSTEXPR typename enable_if<is_floating_point<_A1>::value,
bool>::type
                                    ^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:551:37: error:
expected unqualified-id
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:563:39: error:
use of undeclared identifier 'is_floating_point'
_LIBCPP_CONSTEXPR typename enable_if<!is_floating_point<_A1>::value,
bool>::type
                                      ^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:563:57: error:
'_A1' does not refer to a value
_LIBCPP_CONSTEXPR typename enable_if<!is_floating_point<_A1>::value,
bool>::type
                                                        ^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:561:17: note:
declared here
template <class _A1>
                ^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:563:63: error:
definition or redeclaration of 'value' cannot name the global scope
_LIBCPP_CONSTEXPR typename enable_if<!is_floating_point<_A1>::value,
bool>::type
                                                            ~~^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[2]: *** [CMakeFiles/main.dir/main.cpp.o] Error 1
make[1]: *** [CMakeFiles/main.dir/all] Error 2
make: *** [all] Error 2






--
Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html


More information about the vtkusers mailing list