Hi Salvatore, On Monday 05 November 2007, Salvatore Iovene wrote: > On 11/3/07, Alexander Neundorf <[EMAIL PROTECTED]> wrote: ...
> > Which compiler do you use ? > > mwccsym2.exe (Nokia codewarrior C/C++ compiler for winscw platform) and > gcce (for GCCE platform) Please put the attached CMakeDetermineC/CXXCompiler.c/cpp files into Modules/, then cmake should say "The C compiler identification is Metrowerks". This means it has detected the compiler correctly. If you're lucky you don't have to change anything, and the generic compiler flags will work with mwcc, otherwise you have to create a file Modules/Platform/Metrowerks.cmake, where the compiler specific variables are set (see e.g. Linux-SunPro-c.cmake). For gcce you shouldn't have to do that. > > What are the naming conventions for object files, static libs, shared > > libs, executables on Symbian ? > > objfilename.o, staticlibname.lib, dllname.dll, executable.exe > Attached you can find a file Symbian.cmake, which you should put into Modules/Platform/, then cmake should load these settings (if you use CMAKE_SYSTEM_NAME=Symbian). Please have a look in this file, at the end there are some lines commented out, you should remove the comments from one of the two options. Let me know how it works. Alex
#ifdef __cplusplus # error "A C++ compiler has been selected for C." #endif #ifdef __CLASSIC_C__ # define const #endif #if defined(__INTEL_COMPILER) || defined(__ICC) # define COMPILER_ID "Intel" #elif defined(__BORLANDC__) # define COMPILER_ID "Borland" #elif defined(__WATCOMC__) # define COMPILER_ID "Watcom" #elif defined(__MWERKS__) # define COMPILER_ID "Metrowerks" #elif defined(__SUNPRO_C) # define COMPILER_ID "SunPro" #elif defined(__HP_cc) # define COMPILER_ID "HP" #elif defined(__DECC) # define COMPILER_ID "Compaq" #elif defined(__IBMC__) # define COMPILER_ID "VisualAge" #elif defined(__PGI) # define COMPILER_ID "PGI" #elif defined(__GNUC__) # define COMPILER_ID "GNU" #elif defined(_MSC_VER) # define COMPILER_ID "MSVC" #elif defined(__ADSPBLACKFIN__) || defined(__ADSPTS__) || defined(__ADSP21000__) /* Analog Devices C++ compiler for Blackfin, TigerSHARC and SHARC (21000) DSPs */ # define COMPILER_ID "ADSP" /* IAR Systems compiler for embedded systems. http://www.iar.com Not supported yet by CMake #elif defined(__IAR_SYSTEMS_ICC__) # define COMPILER_ID "IAR" */ /* sdcc, the small devices C compiler for embedded systems, http://sdcc.sourceforge.net */ #elif defined(SDCC) # define COMPILER_ID "SDCC" #elif defined(_COMPILER_VERSION) # define COMPILER_ID "MIPSpro" /* This compiler is either not known or is too old to define an identification macro. Try to identify the platform and guess that it is the native compiler. */ #elif defined(__sgi) # define COMPILER_ID "MIPSpro" #elif defined(__hpux) || defined(__hpua) # define COMPILER_ID "HP" #else /* unknown compiler */ # define COMPILER_ID "" #endif static char const info_compiler[] = "INFO:compiler[" COMPILER_ID "]"; /* Include the platform identification source. */ #include "CMakePlatformId.h" /* Make sure the information strings are referenced. */ int main() { return (&info_compiler[0] != &info_platform[0]); }
/* This source file must have a .cpp extension so that all C++ compilers recognize the extension without flags. Borland does not know .cxx for example. */ #ifndef __cplusplus # error "A C compiler has been selected for C++." #endif #if defined(__COMO__) # define COMPILER_ID "Comeau" #elif defined(__INTEL_COMPILER) || defined(__ICC) # define COMPILER_ID "Intel" #elif defined(__BORLANDC__) # define COMPILER_ID "Borland" #elif defined(__WATCOMC__) # define COMPILER_ID "Watcom" #elif defined(__MWERKS__) # define COMPILER_ID "Metrowerks" #elif defined(__SUNPRO_CC) # define COMPILER_ID "SunPro" #elif defined(__HP_aCC) # define COMPILER_ID "HP" #elif defined(__DECCXX) # define COMPILER_ID "Compaq" #elif defined(__IBMCPP__) # define COMPILER_ID "VisualAge" #elif defined(__PGI) # define COMPILER_ID "PGI" #elif defined(__GNUC__) # define COMPILER_ID "GNU" #elif defined(_MSC_VER) # define COMPILER_ID "MSVC" #elif defined(__ADSPBLACKFIN__) || defined(__ADSPTS__) || defined(__ADSP21000__) /* Analog Devices C++ compiler for Blackfin, TigerSHARC and SHARC (21000) DSPs */ # define COMPILER_ID "ADSP" #elif defined(_COMPILER_VERSION) # define COMPILER_ID "MIPSpro" /* This compiler is either not known or is too old to define an identification macro. Try to identify the platform and guess that it is the native compiler. */ #elif defined(__sgi) # define COMPILER_ID "MIPSpro" #elif defined(__hpux) || defined(__hpua) # define COMPILER_ID "HP" #else /* unknown compiler */ # define COMPILER_ID "" #endif static char const info_compiler[] = "INFO:compiler[" COMPILER_ID "]"; /* Include the platform identification source. */ #include "CMakePlatformId.h" /* Make sure the information strings are referenced. */ int main() { return (&info_compiler[0] != &info_platform[0]); }
# SET(WIN32 1) maybe ? SET(CMAKE_STATIC_LIBRARY_PREFIX "") SET(CMAKE_STATIC_LIBRARY_SUFFIX ".lib") SET(CMAKE_SHARED_LIBRARY_PREFIX "") # lib SET(CMAKE_SHARED_LIBRARY_SUFFIX ".dll") # .so SET(CMAKE_IMPORT_LIBRARY_PREFIX "") SET(CMAKE_IMPORT_LIBRARY_SUFFIX ".lib") SET(CMAKE_EXECUTABLE_SUFFIX ".exe") # .exe SET(CMAKE_LINK_LIBRARY_SUFFIX ".lib") SET(CMAKE_DL_LIBS "") SET(CMAKE_FIND_LIBRARY_PREFIXES "") SET(CMAKE_FIND_LIBRARY_SUFFIXES ".lib") # for nmake make long command lines are redirected to a file # with the following syntax, see Windows-bcc32.cmake for use IF(CMAKE_GENERATOR MATCHES "NMake") SET(CMAKE_START_TEMP_FILE "@<<\n") SET(CMAKE_END_TEMP_FILE "\n<<") ENDIF(CMAKE_GENERATOR MATCHES "NMake") SET(SYMBIAN 1) # is it more like windows ? # SET(WIN32 1) # INCLUDE(Platform/WindowsPaths) # or like unix, e.g. libraries in lib/ ? # SET(UNIX 1) # INCLUDE(Platform/UnixPaths)
_______________________________________________ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake