Skip to content
This repository was archived by the owner on Apr 4, 2024. It is now read-only.
This repository was archived by the owner on Apr 4, 2024. It is now read-only.

Error in setting compiler options #6

@william-swy

Description

@william-swy

From my understanding MINGW takes GCC flags.

So in this conditional

if(MSVC OR MSYS OR MINGW)
    set(COMPILER_OPTIONS ${COMPILER_OPTIONS} /Ox /DAE_OS=AE_WINDOWS)
    execute_process( COMMAND wmic CPU get Name OUTPUT_VARIABLE CPU_NAME)
    if (${CPU_NAME} MATCHES "Intel")
        set(COMPILER_OPTIONS ${COMPILER_OPTIONS} /DAE_CPU=AE_INTEL)
    endif()

elseif(UNIX)
    set(COMPILER_OPTIONS ${COMPILER_OPTIONS} -O3 -DAE_OS=AE_POSIX -pthread)
    execute_process( COMMAND uname -m OUTPUT_VARIABLE ARCHITECTURE)

    if (${ARCHITECTURE} MATCHES "x86_64")
        set(COMPILER_OPTIONS ${COMPILER_OPTIONS} -DAE_CPU=AE_INTEL)
    endif()
endif()

I'm quite sure MINGW option should be moved with the UNIX branch. I have MINGW on my windows computer and the current compiler options makes g++.exe generate errors where it interprets /Ox as a path. When I add MINGW to the UNIX conditional, I get no errors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions