Problem is affecting 7872b1c and snapshot 3.6.1_20161102 but didn't affect e. g. 2b6c548 or snapshot 3.6.1_20160630 when these were the most recent versions of branch master and snapshot respectively.
I do not know whether this option is still meant to work in the first place or was deprecated in the meantime. If so the CMake output should be modified as it states
when the variable is not set on a system providing the necessary prerequisites.Info: Your compiler supports C++11. You may enable C++11 features via "DCMTK_USE_CXX11_STL" to create a C++11 build of DCMTK."
Output of make when failing reads
Code: Select all
/usr/local/peter/Tests/DCMTK/Projekt/dcmtk/ofstd/include/dcmtk/ofstd/ofvriant.h:63:5: error: body of constexpr function 'static constexpr std::size_t OFvariant_traits<Index, Alternative0, Alternatives ...>::alignment() [with long unsigned int Index = 2ul; Alternative0 = bool; Alternatives = {}; std::size_t = long unsigned int]' not a return-statement
}
^
/usr/local/peter/Tests/DCMTK/Projekt/dcmtk/ofstd/include/dcmtk/ofstd/ofvriant.h: In instantiation of 'struct OFvariant_traits<Index, Alternative0, Alternatives ...>::alignment() [with long unsigned int Index = 1ul; Alternative0 = float; Alternatives = {bool}; std::size_t = long unsigned int]::test':
/usr/local/peter/Tests/DCMTK/Projekt/dcmtk/ofstd/include/dcmtk/ofstd/ofvriant.h:61:108: required from 'static constexpr std::size_t OFvariant_traits<Index, Alternative0, Alternatives ...>::alignment() [with long unsigned int Index = 1ul; Alternative0 = float; Alternatives = {bool}; std::size_t = long unsigned int]'
/usr/local/peter/Tests/DCMTK/Projekt/dcmtk/ofstd/include/dcmtk/ofstd/ofvriant.h:61:83: required from 'struct OFvariant_traits<Index, Alternative0, Alternatives ...>::alignment() [with long unsigned int Index = 0ul; Alternative0 = int; Alternatives = {float, bool}; std::size_t = long unsigned int]::test'
/usr/local/peter/Tests/DCMTK/Projekt/dcmtk/ofstd/include/dcmtk/ofstd/ofvriant.h:61:108: required from 'static constexpr std::size_t OFvariant_traits<Index, Alternative0, Alternatives ...>::alignment() [with long unsigned int Index = 0ul; Alternative0 = int; Alternatives = {float, bool}; std::size_t = long unsigned int]'
/usr/local/peter/Tests/DCMTK/Projekt/dcmtk/ofstd/include/dcmtk/ofstd/ofvriant.h:316:30: required from 'class OFvariant<int, float, bool>'
/usr/local/peter/Tests/DCMTK/Projekt/dcmtk/ofstd/tests/tvariant.cc:60:33: required from here
/usr/local/peter/Tests/DCMTK/Projekt/dcmtk/ofstd/include/dcmtk/ofstd/ofvriant.h:61:105: error: requested alignment is not an integer constant
struct test { alignas(OFvariant_traits<Index+1,Alternatives...>::alignment()) first_alternative a; };
^
/usr/local/peter/Tests/DCMTK/Projekt/dcmtk/ofstd/include/dcmtk/ofstd/ofvriant.h: In instantiation of 'static constexpr std::size_t OFvariant_traits<Index, Alternative0, Alternatives ...>::alignment() [with long unsigned int Index = 1ul; Alternative0 = float; Alternatives = {bool}; std::size_t = long unsigned int]':
/usr/local/peter/Tests/DCMTK/Projekt/dcmtk/ofstd/include/dcmtk/ofstd/ofvriant.h:61:83: required from 'struct OFvariant_traits<Index, Alternative0, Alternatives ...>::alignment() [with long unsigned int Index = 0ul; Alternative0 = int; Alternatives = {float, bool}; std::size_t = long unsigned int]::test'
/usr/local/peter/Tests/DCMTK/Projekt/dcmtk/ofstd/include/dcmtk/ofstd/ofvriant.h:61:108: required from 'static constexpr std::size_t OFvariant_traits<Index, Alternative0, Alternatives ...>::alignment() [with long unsigned int Index = 0ul; Alternative0 = int; Alternatives = {float, bool}; std::size_t = long unsigned int]'
/usr/local/peter/Tests/DCMTK/Projekt/dcmtk/ofstd/include/dcmtk/ofstd/ofvriant.h:316:30: required from 'class OFvariant<int, float, bool>'
/usr/local/peter/Tests/DCMTK/Projekt/dcmtk/ofstd/tests/tvariant.cc:60:33: required from here
/usr/local/peter/Tests/DCMTK/Projekt/dcmtk/ofstd/include/dcmtk/ofstd/ofvriant.h:63:5: error: body of constexpr function 'static constexpr std::size_t OFvariant_traits<Index, Alternative0, Alternatives ...>::alignment() [with long unsigned int Index = 1ul; Alternative0 = float; Alternatives = {bool}; std::size_t = long unsigned int]' not a return-statement
}
^
/usr/local/peter/Tests/DCMTK/Projekt/dcmtk/ofstd/include/dcmtk/ofstd/ofvriant.h: In instantiation of 'struct OFvariant_traits<Index, Alternative0, Alternatives ...>::alignment() [with long unsigned int Index = 0ul; Alternative0 = int; Alternatives = {float, bool}; std::size_t = long unsigned int]::test':
/usr/local/peter/Tests/DCMTK/Projekt/dcmtk/ofstd/include/dcmtk/ofstd/ofvriant.h:61:108: required from 'static constexpr std::size_t OFvariant_traits<Index, Alternative0, Alternatives ...>::alignment() [with long unsigned int Index = 0ul; Alternative0 = int; Alternatives = {float, bool}; std::size_t = long unsigned int]'
/usr/local/peter/Tests/DCMTK/Projekt/dcmtk/ofstd/include/dcmtk/ofstd/ofvriant.h:316:30: required from 'class OFvariant<int, float, bool>'
/usr/local/peter/Tests/DCMTK/Projekt/dcmtk/ofstd/tests/tvariant.cc:60:33: required from here
/usr/local/peter/Tests/DCMTK/Projekt/dcmtk/ofstd/include/dcmtk/ofstd/ofvriant.h:61:105: error: requested alignment is not an integer constant
struct test { alignas(OFvariant_traits<Index+1,Alternatives...>::alignment()) first_alternative a; };
^
/usr/local/peter/Tests/DCMTK/Projekt/dcmtk/ofstd/include/dcmtk/ofstd/ofvriant.h: In instantiation of 'static constexpr std::size_t OFvariant_traits<Index, Alternative0, Alternatives ...>::alignment() [with long unsigned int Index = 0ul; Alternative0 = int; Alternatives = {float, bool}; std::size_t = long unsigned int]':
/usr/local/peter/Tests/DCMTK/Projekt/dcmtk/ofstd/include/dcmtk/ofstd/ofvriant.h:316:30: required from 'class OFvariant<int, float, bool>'
/usr/local/peter/Tests/DCMTK/Projekt/dcmtk/ofstd/tests/tvariant.cc:60:33: required from here
/usr/local/peter/Tests/DCMTK/Projekt/dcmtk/ofstd/include/dcmtk/ofstd/ofvriant.h:63:5: error: body of constexpr function 'static constexpr std::size_t OFvariant_traits<Index, Alternative0, Alternatives ...>::alignment() [with long unsigned int Index = 0ul; Alternative0 = int; Alternatives = {float, bool}; std::size_t = long unsigned int]' not a return-statement
}
^
In file included from /usr/local/peter/Tests/DCMTK/Projekt/dcmtk/ofstd/tests/tvariant.cc:5:0:
/usr/local/peter/Tests/DCMTK/Projekt/dcmtk/ofstd/include/dcmtk/ofstd/ofvriant.h: In instantiation of 'class OFvariant<int, float, bool>':
/usr/local/peter/Tests/DCMTK/Projekt/dcmtk/ofstd/tests/tvariant.cc:60:33: required from here
/usr/local/peter/Tests/DCMTK/Projekt/dcmtk/ofstd/include/dcmtk/ofstd/ofvriant.h:316:71: error: requested alignment is not an integer constant
alignas(traits::alignment()) std::uint8_t m_Content[traits::size()];
^
make[2]: *** [ofstd/tests/CMakeFiles/ofstd_tests.dir/build.make:567: ofstd/tests/CMakeFiles/ofstd_tests.dir/tvariant.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:369: ofstd/tests/CMakeFiles/ofstd_tests.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 25%] Building CXX object oflog/libsrc/CMakeFiles/oflog.dir/cygwin32.cc.o
[ 25%] Building CXX object oflog/libsrc/CMakeFiles/oflog.dir/striconv.cc.o
[ 25%] Building CXX object oflog/libsrc/CMakeFiles/oflog.dir/strcloc.cc.o
[ 25%] Building CXX object oflog/libsrc/CMakeFiles/oflog.dir/strccloc.cc.o
[ 25%] Building CXX object oflog/libsrc/CMakeFiles/oflog.dir/unixsock.cc.o
[ 25%] Linking CXX static library ../../lib/liboflog.a
[ 25%] Built target oflog
make: *** [Makefile:139: all] Error 2