[CMake] how to detect architecture ?

Franck Houssen franck.houssen at inria.fr
Tue Jan 9 10:04:28 EST 2018


Thanks ! 

----- Mail original -----
> De: "Konstantin Tokarev" <annulen at yandex.ru>
> À: "Franck Houssen" <franck.houssen at inria.fr>, "CMake Mail List" <cmake at cmake.org>
> Envoyé: Mardi 9 Janvier 2018 16:00:55
> Objet: Re: [CMake] how to detect architecture ?
> 
> 
> 
> 09.01.2018, 17:58, "Franck Houssen" <franck.houssen at inria.fr>:
> > Is there a way to detect architecture ?
> >
> > Seems there is nothing simple since these old threads :
> > https://stackoverflow.com/questions/11944060/how-to-detect-target-architecture-using-cmake/12024211#12024211
> > https://stackoverflow.com/questions/16796629/cmake-create-architecture-aware-makefile
> >
> > Is there a solution now ?
> >
> > My need is quite simple: I have an executable who needs dlopen. To test it,
> > I planned to write a bash script that would have done "./exe
> > /path/to/lib.so" on linux (debian, ...) OR "./exe /path/to/lib.dylib" on
> > osx. To replace correctly so/dylib in the bash script I need to know the
> > architecture. Any idea how to do this ?
> 
> ${CMAKE_SHARED_LIBRARY_SUFFIX}
> 

Oh man ! Didn't know this one : exactly what I was looking for

> > Franck
> > ,--
> >
> > 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:
> > https://cmake.org/mailman/listinfo/cmake
> 
> 
> --
> Regards,
> Konstantin
> 


More information about the CMake mailing list